<template>
  <el-container>
    <el-main>
      <el-tabs v-model="activeName" @tab-click="handleClick">
        <el-tab-pane label="费用设置" name="setting">
          <fee-manage ref="setting" />
        </el-tab-pane>
        <el-tab-pane label="费用方案" name="schema">
          <fee-schema ref="schema" />
        </el-tab-pane>
      </el-tabs>
    </el-main>
  </el-container>
</template>

<script>
  import feeManage from '@/views/page/M8/fee/feeManage/feeManage'
  import feeSchema from '@/views/page/M8/fee/feeManage/feeSchema'

  export default {
    components: {
      feeSchema, feeManage
    },
    data() {
      return {
        activeName: 'setting'
      }
    },
    activated() {
      this.activeName = 'setting'
      this.$refs['setting'].init()
    },
    methods: {
      handleClick(tab, event) {
        this.$refs[tab.name].init()
      }
    }
  }
</script>
